/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sirtet.netplay.event;

import java.util.EventListener;

/**
 * The listener interface for receiving communication events.  The listener object
 * created from that class is then registered with a Communicator using the
 * Communicator's addCommunicationListener method. When the communication loses
 * connection or new data arrives, the relevant method in the listener object is
 * invoked, and the CommunicationEvent or CommunicationDataEvent is passed to it.
 * @author guangwei.zhu
 */
public interface CommunicationListener extends EventListener {

    /**
     * Invoked when the communication is disconnected.
     */
    public abstract void communicationDisconnected(CommunicationEvent evt);

    /**
     * Invoked when new data is received from the remote peer.
     */
    public abstract void communicationDataReceived(CommunicationDataEvent evt);
}
